package com.zrrd.learn.chapter08.Person;

import lombok.Data;
import sun.plugin2.message.GetNameSpaceMessage;

/**
 * 学生类
 *
 * @author asus
 * @version 1.0
 * @date 2023/7/24 10:22
 */
@Data
public class Student extends Person {
    int[] scores = new int[5];


    public void average(int[] scores) {
        int num = 0;
        for (int i = 0; i < scores.length; i++) {
            num += scores[i];
        }
        double ave=num / scores.length;
        System.out.println(this.getName()+"同学的平均成绩是：");
        System.out.println(ave);

    }


}

